package com.bw.user.controller;



import cn.hutool.core.util.ObjectUtil;
import com.bw.core.result.ResponseResult;
import com.bw.user.pojo.TbLinkmanAuth;
import com.bw.user.service.TbLinkmanAuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 联系人认证表 前端控制器
 * </p>
 *
 * @author lv
 * @since 2021-03-23
 */
@RestController
@RequestMapping("/tb-linkman-auth")
public class TbLinkmanAuthController {

    @Autowired
    private TbLinkmanAuthService linkmanAuthService;

   /* @GetMapping("/list")
    public List<TbLinkmanAuth> linkman()
    {
        return service.list();
    }
*/

    /**
     *
     * @param tbLinkmanAuth
     * @return
     * 联系人
     */
    @PostMapping("/linkauth")
    public ResponseResult linkauth(@RequestBody TbLinkmanAuth tbLinkmanAuth)
    {
        if (ObjectUtil.isNull(tbLinkmanAuth)){
            return ResponseResult.error("对象不存在");
        }
        return linkmanAuthService.linkauth(tbLinkmanAuth);
    }


}
